<html>
<head>
    <title>双预防系统</title>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="../../../style.css">

    <style>
        body {
            background: #F0F2F6;
        }

        .main-head {
            background: #fff;
            padding-left: 10px;
            padding-top: 10px;
            margin-bottom: 0px;
            border: solid 1px #fff;
        }

        .chart-outer {
            height: 200px;
        }

        .inputW {
            width: 150px;
        }

        .itemW {
            width: 200px;
        }

        .formLabelWidth {
            width: 100px;
        }
    </style>
</head>
<body>
<div class="page" id="page-monitor">
    <div class="page-main">
        <el-row>
            <el-col :span="24">
                <div class="main-head">
                    <el-form :inline="true" size="small">
                        <el-form-item label="时间">
                            <el-date-picker
                                    v-model="param.date"
                                    type="date"
                                    value-format="yyyy-MM-dd"
                                    placeholder="选择日期">
                            </el-date-picker>
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary" @click="search">查询</el-button>
                        </el-form-item>
                    </el-form>
                </div>
                <el-table :data="checkTable"  :stripe="true" :border="true" size="mini" style="width: 100%">
                    <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
                    <el-table-column prop="employeeName" label="姓名" align="center"></el-table-column>
                    <el-table-column prop="className" label="班级名称" align="center"></el-table-column>
                    <el-table-column prop="signTime" label="考勤时间" align="center">
                        <template slot-scope="scope">
                                 {{scope.row.signTime.replace('T',' ')}}
                        </template>
                    </el-table-column>
                    <el-table-column prop="macId" label="考勤机" align="center"></el-table-column>
                    <el-table-column prop="cardNo" label="证件号" align="center"></el-table-column>
                    <el-table-column prop="bodyTemp" label="体温" align="center"></el-table-column>
                </el-table>
                <div class="page-footer">
                    <el-pagination background layout="prev, pager, next" :pagesize="param.pagesize" :total="totalCount"
                                   :current-page.sync="param.pageno" @current-change="onChangePage">
                    </el-pagination>
                </div>
            </el-col>
        </el-row>


    </div>
</div>
<script type='text/javascript' src='../../../assets/bundle.js' charset='utf-8'></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type='text/javascript' src='../../../assets/jquery-1.11.2.min.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../assets/echarts.min.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../js/common.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../js/component.js' charset='utf-8'></script>
<script>
    var vuePage = new Vue({
        el: '#page-monitor',
        data: {
            checkTable:[],
            param:{
                date:'',
                pagesize:10,
                pageno:1,
                projectNo:SiteConfig.account.projectNo
            },
            headers:{},
            classAddFormVisible:false,
            classAddForm:{},
            totalCount:0,
            grades:[
                {id:1,text:'一年级'},{id:2,text:'二年级'},{id:3,text:'三年级'},{id:4,text:'四年级'},{id:5,text:'五年级'},{id:6,text:'六年级'},{id:7,text:'七年级'},{id:8,text:'八年级'},{id:9,text:'九年级'},
                {id:10,text:'高中一年级'},{id:11,text:'高中二年级'},{id:12,text:'高中三年级'}
            ],
            studentVisible:false,
            addInnerVisible:false,
            editInnerVisible:false,
            fileList:[],
            stuForm:{},
            formLabelWidth:'120px'
        },
        created: function () {
            $('.page').show();
        },
        methods: {
            search(){
                   this.getcheckTime();
            },
            onChangePage(page){
                this.param.pageno = page;
                this.getClass();
            },

            getcheckTime(){
                HttpUtil.get('employee/getcheckTime',this.param).success((r)=>{
                    this.checkTable = r.data;
                    this.totalCount = r.total;
                })
            }
        },

        mounted: function () {
            this.param.date = TimeUtil.convertToString(new Date()).substr(0,10);
                  this.getcheckTime();

        }
    });
</script>
</body>
</html>
